count = 0
sum = 0
numbers = [1,2,3,4]
for i in numbers:
    for j in numbers:
        for k in numbers:
            if (i != j) and (i != k) and (j != k):
                s = str(i) + str(j) + str(k)
                sum = sum + int(s)
                count = count + 1
average = float(sum) / count
print(count)
print(average)